<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>jq的end方法</title>
		<script src="../js/jquery-3.6.3.min.js"></script>
		<script>
			$(function(){
				//第一个，第三个，字体变红，变大
				$("#btn").click(function(){
					$("#m").find(":first-child").css({"font-size":"40px","color":"red"}).end().find(":nth-child(3)").css({"font-size":"60px","color":"lightblue"});
				});
			});
		</script>
	</head>
	<body>
		<ul id="m">
			<li>常以名</li>
			<li>胡汪洋</li>
			<li>老宋</li>
			<li>李凡</li>
			<li>niuzhengdong</li>
		</ul>
		<button type="button" id="btn">改动</button>
	</body>
</html>